package com.ys.io.作业;

/**
 * 描述:
 *
 * @author CodeYang
 * @version 2021/1/2 20:21
 */
public class 下载文件测试 {
    private final static String[] URL_PATH = {
            "http://n.sinaimg.cn/sports/2_img/upload/69e00db4/20170328/w1so-fycstxp5271276.jpg",
            "http://n.sinaimg.cn/sports/2_img/upload/69e00db4/20170328/k3tH-fyctevp9037944.jpg",
            "http://n.sinaimg.cn/sports/2_img/upload/69e00db4/20170328/a27s-fycstxp5271274.jpg",
            "http://n.sinaimg.cn/sports/2_img/upload/69e00db4/20170328/8IYH-fycstww1654561.jpg",
            "http://n.sinaimg.cn/sports/2_img/upload/69e00db4/20170328/ghEs-fycstww1654563.jpg"
    };

    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        try {
            for (String url : URL_PATH) {

                DownResource.down(url);

            }
            long end = System.currentTimeMillis();

            System.out.println("耗时:"+(end-start));
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
